{% extends '::base.html.twig' %}
{% block javascript %}
	{{ parent() }}
	
	<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css">
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"></script>
	<script type="text/javascript">
	
	$(document).ready(function() {        
        //update by ID window setup 
        $byID = jQuery('#uByID'); 
 
        //instantiate the dialog 
        $byID.dialog({ height: 150, 
                           width: 400, 
                           modal: true, 
                           position: 'center', 
                           autoOpen:false, 
                           title:'Update Series By ID', 
                           overlay: { opacity: 0.5, background: 'black'} 
                        });
         //update by list window setup
         $byList = jQuery('#uByList'); 
 
        //instantiate the dialog 
        $byList.dialog({ height: 225, 
                           width: 400, 
                           modal: true, 
                           position: 'center', 
                           autoOpen:false, 
                           title:'Update Series By Range of IDs', 
                           overlay: { opacity: 0.5, background: 'black'} 
                        });                     
         //setup link clicks 
         $("#UpdateByID").click( function()
         {
         	//if the contents have been hidden with css, you need this 
	        $byID.show();  
	        //open the dialog 
	        $byID.dialog("open"); 
         });
         
         $("#UpdateByList").click( function()
         {
         	//if the contents have been hidden with css, you need this 
	        $byList.show();  
	        //open the dialog 
	        $byList.dialog("open"); 
         });
    }); 

	</script>
{% endblock %}

{% block body %}
	{{ parent() }}
		<h1>Admin Panel: </h1>  
		<form>
		  <fieldset style="margin-top: 10px; width: 275px; float: left">
		    <legend style="margin-left: 20px;"><h3>TV Series:</h3></legend>
			    <div style="margin: 10px 20px 20px 25px">
			    	
					<a id="UpdateByID" href="#">Update Series By ID</a><br /><br />
			    	<a id="UpdateByList" href="#">Update Series By ID Range</a><br /><br />
			    	<a href="#">Update Series By Date</a><br /><br />
			    	<a href="{{ path('_userEdit') }}">View All User Entries</a><br />
		  		</div>
		  </fieldset>
		  
		  <fieldset style="margin-top: 10px; margin-left: 10px; width: 275px; float: left">
		    <legend style="margin-left: 20px;"><h3>Users:</h3></legend>
			    <div style="margin: 10px 20px 20px 25px">
			    	<a href="{{ path('_userstatus', {'input': '0', 'range': '5'}) }}">Update User Status</a>
		  		</div>
		  </fieldset>
		  
		  <fieldset style="margin-top: 10px; margin-left: 10px; width: 275px; float: left">
		    <legend style="margin-left: 20px;"><h3>Settings:</h3></legend>
			    <div style="margin: 10px 20px 20px 25px">
		  		</div>
		  </fieldset>
		  <div style="clear:both">&nbsp;</div>
		</form>
		
		<div id="uByID" style="display:none; text-align:center"> 
		    <form action="{{ path('_updaterange') }}" method="post">
		    	{{form_label( form.seriesid, 'Starting at ID: ' ) }}
				{{ form_widget( form.seriesid ) }}
				<div class="field-error">{{ form_errors( form.seriesid ) }}</div>
				<br style="clear:both"/>
		    	<input type="submit" value="Submit" class="grey-button"/> 
		    </form> 
		</div>  
		<div id="uByList" style="display:none; text-align:center"> 
		    <form action="{{ path('_updaterange') }}" method="post">
		    	{{form_label( form.startid, 'Starting at ID: ' ) }}
				{{ form_widget( form.startid ) }}
				<div class="field-error">{{ form_errors( form.startid ) }}</div>
		    	<br style="clear:both"/>
		    	{{form_label( form.endid, 'to ID: ' ) }}
				{{ form_widget( form.endid ) }}
				<div class="field-error">{{ form_errors( form.endid ) }}</div>
		    	<br style="clear:both"/>
		    	<input type="submit" value="Submit" class="grey-button"/> 	
		    </form> 
		</div>		
 {% endblock %}

